function checkCommand(cmdpack) {
    return $.ajax({
        url: "/api/AddUrlsApi",
        type: "POST",
        data: JSON.stringify(cmdpack),
        contentType: "application/json;charset=utf-8",
        dataType: "json",
    });
}
$("#checkUrls").click(function () {
    $('body').addClass('ui-loading');
    $('#checkPane').hide();
    var p = { urls: $("#urls").text(), checkOnly: true };
    checkCommand(p).done(function (data) {
        if (data.success) {
            $("#addUrls").show();
        }
        var r = data;
        $("#checkedResult").html(r.html);
    }).fail(function () {
        alert("server communication error");
    }).always(function () {
        $('#checkPane').show();
        $('body').removeClass('ui-loading');
    });
});
$("#addUrls").click(function () {
    $('body').addClass('ui-loading');
    $('#checkPane').hide();
    var p = { urls: $("#urls").text(), checkOnly: false };
    checkCommand(p).done(function (data) {
        if (data.success) {
            $("#checkUrls").hide();
            $("#addUrls").hide();
        }
        var r = data;
        $("#checkedResult").html(r.html);
    }).fail(function () {
        alert("server communication error");
    }).always(function () {
        $('#checkPane').show();
        $('body').removeClass('ui-loading');
    });
});
//# sourceMappingURL=addModule.js.map